﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace SmartFactory.Controllers
{
    public class ProcessRouteController : Controller
    {
		private readonly IpAddressesConfig _ipAddressesConfig;

		public ProcessRouteController(IOptions<IpAddressesConfig> ipAddressesConfig)
		{
			_ipAddressesConfig = ipAddressesConfig.Value;
		}
		/// <summary>
		/// 工序路线列表
		/// </summary>
		/// <returns></returns> 
		public IActionResult ProcessRouteList()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
        }
        /// <summary>
        /// 工序路线添加
        /// </summary>
        /// <returns></returns>
        public IActionResult ProcessRouteAdd()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
        }
    }
}
